#ifndef _SOCKET_CONN_PTR_H_
#define _SOCKET_CONN_PTR_H_

#include <log4cxx/logger.h>

class SocketConnPool;

using namespace log4cxx;

class SocketConnPtr {
	public:
		SocketConnPtr();
		int get();
		int assign(int fd, int index, SocketConnPool * pool);
		virtual ~SocketConnPtr();
		int set_network_error(bool b);
		int is_network_error();
	private:
		int _fd;
		int _index;
		SocketConnPool * _pool;
		bool _is_network_error;
		static LoggerPtr _logger;
};

#endif
